package com.electromagnetic.industry.software.manage.pojo.models;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.electromagnetic.industry.software.common.util.EleIdCreator;
import lombok.Data;
import lombok.EqualsAndHashCode;

@EqualsAndHashCode(callSuper = true)
@Data
@TableName("ed_file_favorite")
public class EdFileFavorite extends BaseModel {

    @TableId(type = IdType.ASSIGN_UUID)
    private String id;

    @TableField("user_id")
    private String userId;

    @TableField("file_id")
    private String fileId;

    public void newInit() {
        this.setId(EleIdCreator.createSnowflakeId());
    }
}
